#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QTableWidgetItem>
#include <QTableWidget>
#include <QTimer>
#include "monitor.h"
#include "show.h"

#include "readthread.h"
#include "writethread.h"

namespace Ui {
    class MainWindow;
}

class MainWindow : public QMainWindow {
    Q_OBJECT
public:
    MainWindow(QWidget *parent = 0);
    ~MainWindow();
//protected:
//    changeEvent(QEvent *e);
private:
    Ui::MainWindow *ui;

    Monitor *pMonitor;
    Show *pShow;

    WriteThread oWriter;
    ReadThread oReader;

    QFile file;
public slots:
    void open();    // 测试文件内容显示功能
    void start();   // 接收数据写入文件，并从文件中将内容显示
    void StartRead();
    void StartCompute();

private slots:
    void on_actionMonitor_triggered();
    void on_actionShow_triggered();

};

#endif // MAINWINDOW_H
